package org.lilred.nzbberry.queue;

import org.lilred.nzbberry.util.TypeSafeStringEnumeration;

public class FinishAction extends TypeSafeStringEnumeration {
	public static FinishAction SHUTDOWN_PC = new FinishAction("shutdown_pc");
	public static FinishAction HIBERNATE_PC = new FinishAction("hibernate_pc");
	public static FinishAction STANDBY_PC = new FinishAction("standby_pc");
	public static FinishAction SHUTDOWN_PROGRAM = new FinishAction("shutdown_program");
	public static FinishAction getScriptFinishAction(String scriptName) {
		if (QueueProxy.getInstance().scriptExists(scriptName)) return new FinishAction("script_" + scriptName);
		else throw new IllegalArgumentException("Invalid Script");
	}
	protected FinishAction(String value) { super(value); }
}
